import random
import string


def generate_palindrome(length):
    half = "".join(random.choice(string.ascii_lowercase) for _ in range(length // 2))
    return (
        half + half[::-1]
        if length % 2 == 0
        else half + random.choice(string.ascii_lowercase) + half[::-1]
    )


def generate_case():
    n = random.randint(1, 10)
    s = "".join(random.choice(string.ascii_lowercase) for _ in range(n))
    # Sometimes generate a palindrome
    if random.random() < 0.3:
        s = generate_palindrome(n)
    return s


def generate_test_cases(num_cases=10):
    test_cases = []
    for _ in range(num_cases):
        test_cases.append(generate_case())
    # Add edge cases
    test_cases.append("google")
    test_cases.append("aab")
    test_cases.append("a")
    return test_cases


if __name__ == "__main__":
    test_cases = generate_test_cases()
    for case in test_cases:
        print(case)
